#ifndef _NEPTUNER_NAVIEW_H_
#define _NEPTUNER_NAVIEW_H_

#include "Scubwalker.h"

#include<string>
#include<iostream>
#include<fstream>

class Naview: public Scubwalker
{
public:
	Scope::Type		m_eScopeType; 
	std::string		m_sFilename;
	int				m_nLevel;
	std::string		m_sOutputFile;
	int				m_nLines;
	std::ostream*	m_pxOut;
	Symbol		m_xLastSymbol;
	bool		m_bScopeResolvingNeeded;
	bool		m_bIncludeFileResolving;
	
public:
	Naview(void);
	~Naview(void);

	void setOutputFile(std::string sOutFile);

	void generateHeader();
	void generateBody();
	void generateFooter();

	void generatePaneUBoat();
	void generatePaneSidebar();
	void generatePaneSource();

	void createSpanForScope();
	void createSpanEnd();
	void createNewline();

	virtual void offNewToken(Scope& inScope, Token& inToken);
	virtual void offScopeEntry(Scope& inNewScope, Scope& inOldScope);
    virtual void offScopeExit(Scope& inNewScope, Scope& inOldScope);

private:
	void getSafeHTML(Token& inToken, std::string& sTokenHTML);
	void getSymbolLink(Symbol& xSymbol, std::string& sTokenHTML);
	void checkIncludeFile(Token &inToken, std::string& sTokenHTML);
	void makeFileLink(std::string& sFilename, std::string& sFullFilename, std::string& sTokenHTML);


};


#endif
